<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>0421</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="value in arr2">
                {{value}}
            </li>
            <hr>
            <!-- 循环数组，绑定唯一的key值。用来在更新元素时提高效率 -->
            <li v-for="(value, key) in arr2" :key="key">
                {{value}}
            </li>
        </ul>
    </div>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                arr2: [4,5456,456465,456454,64654,654645646],
                // 如果为数字，则从1开始循环
                num: 100,
                // 如果为字符串，则循环每个字符
                str: "swkdflasjdklfjksldfkl"
            }
        })
    </script>
</body>
</html>